Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Safe Search #76

Merged
merged 4 commits into from
Apr 27, 2024
Merged

Add Safe Search #76

merged 4 commits into from
Apr 27, 2024

Conversation

VincentX0905
Copy link
Contributor

If you want to turn off the safe search function (this function is on by default), you can do this:

from googlesearch import search
search("Google", safe=None) #turn off safe search

If you don't give a safe value, the default is on:

from googlesearch import search
search("Google") #turn on safe search

Add Safe Search for this package
Add Safe Search
@VincentX0905
Copy link
Contributor Author

before merging
You can run pip install -U git+https://github.com/VincentX0905/googlesearch.git to install the package with safe search option.

Copy link
Owner

@Nv7-GitHub Nv7-GitHub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I will try to take a look at this over my break

@VincentX0905
Copy link
Contributor Author

If you include &safe="active" in the URL
SafeSearch mode will be turned on

If &safe=off is included in the URL or not specified
SafeSearch mode will be turned off

Google is committed to creating a safe browsing environment
For this reason, I set this feature to be on by default.

Copy link
Owner

@Nv7-GitHub Nv7-GitHub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@Nv7-GitHub Nv7-GitHub merged commit 2ea17d2 into Nv7-GitHub:master Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants